package com.cci.kangdao.dao;

import com.cci.kangdao.dao.model.CommonNotifyRecordT;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;
import java.util.Map;

@MapperScan
public interface CommonNotifyRecordTDao {
    int deleteByPrimaryKey(Long id);

    int insert(CommonNotifyRecordT record);

    int insertSelective(CommonNotifyRecordT record);

    CommonNotifyRecordT selectByPrimaryKey(Long id);

    List<Map<String,Object>> selectCBUOrderListByNotify(@Param("receiverId") Long receiverId, @Param("category") String category);

    List<CommonNotifyRecordT> selectListByOrderId(@Param("category") String category,@Param("receiverId") Long receiverId, @Param("orderId") Long orderId);

    List<CommonNotifyRecordT> selectListByOrderAndConfig(@Param("category") String category, @Param("orderId") Long orderId, @Param("configId") Long configId);

    int updateByPrimaryKeySelective(CommonNotifyRecordT record);

    int updateByPrimaryKey(CommonNotifyRecordT record);

    int getUnReadCount(@Param("category") String category, @Param("receiverId") Long receiverId);

    int updatePushReadStatusByReceiverId(@Param("category") String category, @Param("orderId") Long orderId, @Param("receiverId") Long receiverId, @Param("updateTime") String updateTime);
}